Skip to main content

Welcome to Namenai Script Mod

Hello this is a simple documentation site for the NSM (Namenai Script Mod).

This here is the live mod.

Jumppack

For Users

There are 2 jumppack types added by this mod. The XD-1 and XD-1 LTU (and black camo for both). The difference is that the XD-1 LTU stands for "Limited Time Use" meaning you can only jump a select few times. This is because it has no energy regen. The only way to get energy back is to enter arsenal, ACE or BIS. If you do things like backpack on chest you will lose all energy, basically anything where it spawns a new backpack. You can drop the backpack on the floor and it will retain its energy.

Controls

You can use CBA keybinds, just go to Options > Controls > Configure Addons > NSM Jumppack Mod. Of the 3, you only need to bind jump and one of cycle left or cycle right. The cycle buttons are like a weapon wheel in older games.

How to Use

  1. Select jump with cycle left or cycle right keybind.
  2. Press jump.
  3. ???
  4. Profit

While you are in the air, you can still take damage but the logic is different. Whenever you get hit theres a certain percent chance that the damage will be applied, and if damage is gonna be applied theres a multiplier. Why is this here? Well I kinda noticed that for some reason AI is really good at shooting you out of the sky so I added this for balancing. So I by default have the chance set to 50%, where you will take 100% of the damage. Due note though that if you go unconscious you wont take fall damage as your unconscious body falls to the ground, which while unrealistic (wrong game lmao) is pretty funny to watch in zeus.

Theres a few different jump settings, one of them is called directional. If you look straight up it will jump you straight up, if you look down you will jump down. Non directional jumps follow a path independent of where you are looking, just in the direction you are facing (or that its set to). So for example a typical long jump will jump you forward 10 meters up and 14 meters forward regardless where your looking. Or there can be a jump that jumps you only to the left at a certain velocity.

For Modders

You can do the following to have our own jumppack. This will be enough and by default the damage chance is at 50% and the damage that will be taken is 100%

Config

Expand for example config
class CfgPatches	
{
class my_cool_jumppack_patch
{
author="UR NAME HERE";
requiredAddons[]=
{
"NSM_patch_end"
};
requiredVersion=0.1;
units[]={
};
weapons[]={};
vehicles[]={
"UR_COOL_NEW_JUMPPACK"
};
};
};
class CfgVehicles
{
class NSM_neutral_XD_1_backpack;
class UR_COOL_NEW_JUMPPACK: NSM_neutral_XD_1_backpack
{
scope = 2;

// wowe daz me 😊
author = "NSM";
displayname = "[Jumppack] XD-1"; //Name this to whatever you want
NSM_jumppack_is_jumppack = 1; // 1 means yes, 0 means no.

// In seconds, I would not reccomend making
// this less then 1 just to account for user lag/network lag.
NSM_jumppack_spam_delay = 1;

// How much energy the pack has, think of like fuel.
NSM_jumppack_energy_capacity = 200;
NSM_jumppack_recharge = 5; // How much energy per second is regenerated.


// This is a little bit ugly
// I wish there was a JSON/Dictonary
// config way do doing this, but the
// cloest is hashmaps
// but thats a script thing not
// config and too much work, RIP cpp :)
NSM_jumppack_jump_types[] = {
{
"Forward Jump",// Name of jump
{
12, //forward velo [meters/second] (0)
20, //verticle velo [meters/second] (1)
50, //cost [no units] (2)
0, //angle [degrees] (3)
0, //directional [bool, 0 = false, 1 = true] (4)
0 //can prone jump [bool, 0 = false, 1 = true] (5)
}
},
{"Short Jump",{25,7,20,0,1,1}}
};

// I wouldnt recommend changing these below.
// Mainly because...idk. I just think its a little
// bit complicated the way I set it up.
// I will try to make it easier in future
// to add stuff, mainly particle effects

// What function to run when to make particle effect. One idea that others have done is make this
// function make a stealth effect for stealthy jumppack, if that even makes sense
NSM_jumppack_jump_effect_script = "NSM_jumppack_effect_fnc_jt_21";

// What points to attach effect to, sorta works I guess,
NSM_jumppack_effect_points[] = {{"spine3",{0,-0.3,-0.1}}};

// Sounds to play
NSM_jumppack_sound_ignite[] = {"NSM_Main\sounds\cdv21Start.ogg"};
NSM_jumppack_sound_land[] = {"NSM_Main\sounds\cdv21End.ogg"};
NSM_jumppack_sound_idle[] = {"NSM_Main\sounds\cdv21Idle.ogg"}; // Not used

//Obviously do watever u want here
model = "NSM_Objects\Data\XD_1_Jumppack.p3d";
maximumload = 100;
hiddenSelections[] = {"camo1"};
hiddenSelectionsTextures[] = {"NSM_Objects\Data\XD_1_JumpPack_CO.paa"};
picture = "\NSM_Objects\icon.paa";
};
};

Scripting

This feature was added long after the initial version of the mod, so my thinking has changed since then. As such I have added this feature via script cause it allows it to be a bit more flexible.

If you want to adjust the damage taken chance and the damage taken multiplier then you can refer to

nsm_Main\XEH_postinit.sqf

and look at NSM_JUMPPACK_DAMAGE_MAP to see what you need. For example this is what I use in the 1st MEU XEH_postinit.sqf

Expand for script to adjust damage chance and damage taken
[
{
count NSM_JUMPPACK_DAMAGE_MAP > 0
},
// what code to run when above is true
{
NSM_JUMPPACK_DAMAGE_MAP set [
"NSM_neutral_XD_1_LTU_blue_backpack", //class name of backpack
[50,1] // [Percent chance to take damage, damage multiplier]
];
NSM_JUMPPACK_DAMAGE_MAP set [
"NSM_neutral_XD_1_LTU_green_backpack",
[50,1]
];
},
[],
60, //after 60 seconds, if the condition isnt met do the below code
//what code to run when timed out
{
//timed out cause it never got defined for watever reason

NSM_JUMPPACK_DAMAGE_MAP = createHashMap;

NSM_JUMPPACK_DAMAGE_MAP set [
"NSM_neutral_XD_1_LTU_blue_backpack",
[50,1]
];
NSM_JUMPPACK_DAMAGE_MAP set [
"NSM_neutral_XD_1_LTU_green_backpack",
[50,1]
];
},
] call CBA_fnc_waitUntilAndExecute;